﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="goods_release.aspx.cs" Inherits="HY.WEB.OA._goods_release" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>

<form id="form1" runat="server">


    <ext:PageManager ID="PageManager1" runat="server"  AutoSizePanelID="Panel2"  />
    
    <ext:Panel ID="Panel2" runat="server"  ShowBorder="True" 
        Layout="HBox" BoxConfigAlign="Stretch" BoxConfigPosition="Left" BoxConfigPadding="0"
        BoxConfigChildMargin="0 0 0 0" ShowHeader="True" Title="单据审批"  >
     <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server" >
                <Items>                
<ext:DropDownList ID="ddlfiled" runat="server" Label="查询字段" ShowLabel="true"  Width="200" >
</ext:DropDownList>                   
<ext:DropDownList ID="ddlwhere" runat="server" Label="查询条件"  >
</ext:DropDownList>                   
<ext:TwinTriggerBox ID="txt" runat="server" ShowLabel="false" EmptyText="关键字"
 Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchMessage_Trigger2Click"
　OnTrigger1Click="ttbSearchMessage_Trigger1Click">
</ext:TwinTriggerBox>

    <ext:Button ID="btnSearch" Icon="Zoom" runat="server"  Text="高级查询" >
    </ext:Button>

               
                  </Items>
            </ext:Toolbar>
        </Toolbars>

        <Items>     
   
       
  <ext:SimpleForm ID="SimpleForm1"  BodyPadding="5px" Width="300px" Height="1" EnableBackgroundColor="true"
        Title="物品发放" runat="server" AutoScroll="true" >
         <Items>
        
             <ext:HiddenField ID="hidsid" runat="server">
             </ext:HiddenField>  
       
             <ext:Label ID="lblbh" runat="server" Label="单号" >
             </ext:Label>  
              <ext:Label ID="lblnm" runat="server" Label="申请人">
             </ext:Label>
               <ext:Label ID="lblitem" runat="server" Label="物品">
             </ext:Label>
               <ext:Label ID="lblunit" runat="server" Label="单位">
             </ext:Label>
              <ext:TextBox ID="txtqty" runat="server" Label="数量">
             </ext:TextBox>
               <ext:TextBox ID="txtprice" runat="server" Label="单价">
             </ext:TextBox>
                <ext:TextBox ID="txttotal" runat="server" Label="金额">
             </ext:TextBox>
               <ext:Label ID="lblstatus" runat="server" Label="状态">
             </ext:Label>   
           <ext:DatePicker runat="server" Label="发放日期" EmptyText="请选择发放日期"   ID="date1"   DateFormatString="yyyy-M-d"  />

           <ext:Button ID="btsave" runat="server" Text="确认发放" OnClick="btsave_Click">
             </ext:Button>
            </Items>
    </ext:SimpleForm>    
    
       <ext:Grid ID="Grid2" Title="详细列表"      Width="650px"   AutoScroll="true"   PageSize="12" ShowBorder="true" ShowHeader="true" AllowPaging="true"
        runat="server" EnableCheckBoxSelect="True"  DataKeyNames="sid,gbh"  AutoPostBack="true"   onrowcommand="Grid2_RowCommand" 
        OnPageIndexChange="Grid2_PageIndexChange" EnableRowNumber="True" OnSort="Grid2_Sort" >
                 <Toolbars>
            <ext:Toolbar ID="Toolbar2" runat="server">
                <Items>
                <ext:Button ID="Button2" Text="未发放" Icon="ApplicationFormMagnify" OnClick="btnp_Click" runat="server">
                    </ext:Button>
                    <ext:Button ID="Button1" Text="已发放" Icon="ApplicationHome" OnClick="btyp_Click" runat="server">
                    </ext:Button>
                    
                  
                    <ext:Button ID="Button3" Text="待批单据" Icon="Eye" OnClick="btnn_Click" runat="server">
                    </ext:Button>
                    <ext:Button ID="Button4" Text="已批单据" Icon="BugGo" OnClick="btny_Click" runat="server">
                    </ext:Button>
                 
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <Columns>
         <ext:LinkButtonField Width="80px" CommandName="sub" HeaderText="单号"  DataTextField="gbh"  />    
                      <ext:HyperLinkField  Width="60px"   DataToolTipField="item" DataTextField="item"  SortField="item" HeaderText="物品名称" 
            DataNavigateUrlFields="gbh" DataNavigateUrlFormatString="review_view.aspx?bh={0}" DataNavigateUrlFieldsEncode="true"   Target="_blank" />                 
                  <ext:BoundField Width="50px" DataField="unit" HeaderText="单位"  />
                   <ext:BoundField Width="50px" DataField="qty" HeaderText="数量"  />
                    <ext:BoundField Width="50px" DataField="price" HeaderText="单价"  />
                     <ext:BoundField Width="50px" DataField="total" HeaderText="金额"  />
                        <ext:BoundField Width="60px" DataField="pname" HeaderText="申请人"  />
                         <ext:BoundField Width="120px" DataField="edt" HeaderText="申请日期"  DataFormatString="{0:yyyy-MM-dd}" />
                         <ext:BoundField Width="120px" DataField="adt" HeaderText="发放日期"  DataFormatString="{0:yyyy-MM-dd}" />
                         
                     <ext:BoundField Width="100px" DataField="rname" HeaderText="发放人"  ToolTip=""  />

                     <ext:BoundField Width="60px" DataField="remark" HeaderText="备注"  />        
                                       
            <ext:TemplateField Width="60px"  HeaderText="状态" >
                <ItemTemplate><%#getstatus(Eval("gbh").ToString())%>
                </ItemTemplate>
             </ext:TemplateField>
        </Columns>
    </ext:Grid>          
    
       
 
        </Items>
    </ext:Panel>
     <ext:Window ID="Window1" Title="编辑" Popup="false" EnableIFrame="true" runat="server"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" IFrameUrl="about:blank"
        OnClose="Window1_Close" Target="Top" IsModal="True" Width="750px" Height="509px">
    </ext:Window>

        <ext:Window ID="Window2" Title="编辑" Popup="false" EnableIFrame="true" runat="server"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" IFrameUrl="about:blank"
        OnClose="Window1_Close" Target="Top" IsModal="True" Width="750px" Height="459px">
    </ext:Window>
    <br />
    <br />
    <br />
    <br />
    <br />
    </form>
</body>
</html>
